# from PyQt5.Qt import *
# import sys
#
# from secret_utils.secret_selenium import encrypt_aes
#
#
# class Window(QWidget):
#
#     def __init__(self):
#         super(Window, self).__init__()
#         self.setWindowTitle('Encrypt Aes')
#         self.resize(300, 130)
#         self.setMinimumSize(300, 130)
#         self.setMaximumSize(300, 130)
#
#         self.label_key = QLabel(self)
#         self.textbox_key = QLineEdit(self)
#         self.label_password = QLabel(self)
#         self.textbox_pw = QLineEdit(self)
#         self.btn_encrypt = QPushButton("Encrypt", self)
#         self.btn_cancel = QPushButton("Cancel", self)
#         self.textbox_aes = QLineEdit(self)
#
#         self.label_key.setText("Encryption Key:")
#         self.label_key.move(5, 10)
#         self.label_key.setFixedSize(135, 25)
#
#         self.textbox_key.move(150, 8)
#         self.textbox_key.setFixedSize(135, 25)
#
#         self.label_password.setText("Password to be Encrypted:")
#         self.label_password.move(5, 40)
#         self.label_password.setFixedSize(140, 25)
#
#         self.textbox_pw.setEchoMode(QLineEdit.Password)
#         self.textbox_pw.setClearButtonEnabled(True)
#         action = QAction(self.textbox_pw)
#         action.setIcon(QIcon("../../tools/secret_utils/img/close.png"))
#         self.textbox_pw.setEchoMode(QLineEdit.Password)
#
#         def echomod_pw():
#             if self.textbox_pw.echoMode() == QLineEdit.Password:
#                 action.setIcon(QIcon('../../tools/secret_utils/img/open.png'))
#                 self.textbox_pw.setEchoMode(QLineEdit.Normal)
#             else:
#                 action.setIcon(QIcon("../../tools/secret_utils/img/close.png"))
#                 self.textbox_pw.setEchoMode(QLineEdit.Password)
#
#         action.triggered.connect(echomod_pw)
#         self.textbox_pw.addAction(action, QLineEdit.TrailingPosition)
#         self.textbox_pw.move(150, 38)
#         self.textbox_pw.setFixedSize(135, 25)
#
#         self.btn_encrypt.move(130, 100)
#
#         self.btn_cancel.move(210, 100)
#
#         self.textbox_aes.move(5, 68)
#         self.textbox_aes.setFixedSize(280, 25)
#
#         self.btn_encrypt.clicked.connect(self.encrypt_pw)
#         self.btn_cancel.clicked.connect(QCoreApplication.instance().quit)
#
#     def encrypt_pw(self):
#         text = self.textbox_pw.text()
#         aes_key = self.textbox_key.text()
#         password_aes = encrypt_aes(text, aes_key)
#         self.textbox_aes.setText(password_aes)
#
#
# if __name__ == "__main__":
#     app = QApplication(sys.argv)
#     window = Window()
#     window.show()
#     sys.exit(app.exec_())
